/*
 * @Description: 
 * @Date: 2022-04-29 16:29:33
 * @LastEditTime: 2023-11-19 20:02:58
 * @FilePath: \vue3\src\main.js
 */
import { createApp } from 'vue'
import App from './App.vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import locale from 'element-plus/es/locale/lang/zh-cn'
import router from "./router/index.js" 
import {createPinia} from "pinia"
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
import TitleTitle from "./components/TitleTitle.vue"
import {vAppFocus} from './plugins/appFocus'
import '../mock/index'
import Pagination from './components/Pagination.vue'
import 'viewerjs/dist/viewer.css'
import VueViewer from 'v-viewer'
import "./styles/index.scss"; 
import Print from 'vue-print-nb'
import * as XLSX from "xlsx";
//创建APP
const app = createApp(App)
//挂载store
const store = createPinia()
store.use(piniaPluginPersistedstate)
//注册全局组件
app.component('TitleTitle', TitleTitle)//自定义title
app.component('Pagination', Pagination)//自定义title
// app.component('CustomQuery', CustomQuery)//自定义title
//挂载插件
app.directive('TestAppFocus',vAppFocus)

//挂载三方库
app.use(ElementPlus,{locale})
app.use(VueViewer)
app.use(Print)
app.use(XLSX)
//挂载路由
app.use(router)

app.use(store)

app.mount('#app')